/*
 * UploadActivity.java
 * 
 * Copyright©2012-2013 JMAS corporation. All rights reserved.
 */
package jp.co.jmas.jmasvideo;

import jp.co.jmas.jmasvideo.R;
import android.accounts.Account;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.PreferenceActivity;

public class SettingActivity extends PreferenceActivity {

	public static final String KEY_ACCOUNT = "account";

	public static final String KEY_QUALITY = "quality";

	public static final String KEY_SERVER = "server";

	public static final String KEY_MAX_DURATION = "maxDuration";

	@SuppressWarnings("deprecation")
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preferences);

		ListPreference accountPref = (ListPreference) findPreference(KEY_ACCOUNT);
		Account[] accounts = AppInfo.getAccounts();
		String[] entries = new String[accounts.length];
		for (int i=0; i<accounts.length; i++) {
			entries[i] = accounts[i].name;
		}
		accountPref.setEntries(entries);
		accountPref.setEntryValues(entries);
	}
}